﻿@model Provider.Models.ManageLtiLoginsViewModel
@{
    ViewBag.Title = "Manage your LTI logins";
}

<h2>@ViewBag.Title.</h2>

<p class="text-success">@ViewBag.StatusMessage</p>
@if (Model.CurrentLogins.Count > 0)
{
    <h4>Registered Logins</h4>
    <table class="table">
        <tbody>
            @foreach (var account in Model.CurrentLogins)
            {
                <tr>
                    <td>@account.ConsumerName</td>
                    <td>
                        @using (Html.BeginForm("RemoveLtiLogin", "Manage"))
                        {
                            @Html.AntiForgeryToken()
                            <div>
                                @Html.Hidden("pairedUserId", account.PairedUserId)
                                <input type="submit" class="btn btn-default" value="Remove" title="Remove this login from your account" />
                            </div>
                        }
                    </td>
                </tr>
            }
        </tbody>
    </table>
}
